<me:UIWBBST x:Class="WPFExcelReport.TWBCP02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"   
                    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                    xmlns:me="clr-namespace:WPFExcelReport"  
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"    
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                   x:Name="TV"
                    Background="White"    
                    Loaded="Window_Loaded"
     >
    <me:UIWBBST.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:KM2YD x:Key="KM2YD"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWBBST.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition> 
        </Grid.RowDefinitions>
        <StackPanel >
            <WrapPanel >
                <Label Content="{Binding Source={Localization:Translate Word=花型号：}}"    Width="60" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Text="{Binding ART,ElementName=TV}" Width="87" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="10" FontSize="14" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=小花号：}}"    Width="60" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="14" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Text="{Binding FARBE,ElementName=TV}" Width="31" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="6" FontSize="14" Foreground="#FF141111" Height="33" />
                <Label Content="{Binding Source={Localization:Translate Word=库}}"    Width="Auto" Margin="1,0,0,0"     FontSize="18"  Foreground="#FF141111" />
                <TextBox Text="{Binding LO,ElementName=TV}" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Yellow"  
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20"   Foreground="#FF141111" />
                <Label Content="{Binding Source={Localization:Translate Word=库区}}"    Width="Auto" Margin="1,0,0,0"     FontSize="18"  Foreground="#FF141111" />
                <TextBox Text="{Binding LB,ElementName=TV}" Width="30" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Yellow"  
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20"   Foreground="#FF141111" /> 
                <Button Content="{Binding Source={Localization:Translate Word=查询}}" Height="33" Margin="10,0,0,0"   Width="96" Panel.ZIndex="9"
                        Click="QueryCommand"/> 
                <Button     Content="{Binding Source={Localization:Translate Word=导 出}}"  Margin="10,0,0,0" Width="Auto" Panel.ZIndex="10"
                    Click="ExcelCommand"   />

            </WrapPanel>
            
        </StackPanel>

        <DataGrid  Grid.Row="1"  
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"
                   Name="dlgMaster"
                   ItemsSource="{Binding Source={StaticResource vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                    >
            <DataGrid.Columns> 
                <!--EKPAUFKRS,EKPAUFLFD,SUPP,SUPPNAME,YARN,YARNDES,LASTDAT,EKKBDAT,SCHNO-->
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=花型号}}" Binding="{Binding WBBART}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=小花号}}" Binding="{Binding WBBFARBE}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=段数}}" Binding="{Binding NRCOUNT}" Width="Auto"/>
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=数量(米)}}" Binding="{Binding WBBISTKLG,Converter={StaticResource ResourceKey=d1000}}"/>
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=数量(码)}}" Binding="{Binding WBBISTKLG,Converter={StaticResource ResourceKey=KM2YD}}"/>
                <!--DataGridTextColumn   Header="{Binding Source={Localization:Translate Word=小卷号}}"   Binding="{Binding WBBPACKNR}"/>
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=格型}}" Binding="{Binding WBBDPART}"/>
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=色级}}" Binding="{Binding WBBTAX}"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=工号}}" Binding="{Binding WBBWARSCH}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=入库日期}}" Binding="{Binding WBBFLZZUGDAT}" Width="Auto"/>
                <DataGridTextColumn Header="{Binding Source={Localization:Translate Word=卷号}}" Binding="{Binding WBBSTKNR}" Width="Auto"/-->
            </DataGrid.Columns>
        </DataGrid  > 
    </Grid>

</me:UIWBBST>
